package com.boot.feign;


import com.boot.business.PurchaseDTO;
import com.boot.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cloud-storage")
public interface StorageFeign {
    @GetMapping("/storage/{id}")
   Result getStorageByProductId(@PathVariable Long id);

    @PostMapping("/storage/deduct")
    Result deduct(@RequestBody PurchaseDTO purchaseDTO);
}
